﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AgencyClassList.aspx.cs" Inherits="Myproject.BSM.PcWeb.PcChannel.Agency.AgencyClassList" %>


<div class="bjui-pageHeader">
    <form id="pc_channel_GoodsclassList_form" data-toggle="ajaxsearch" action="/bsm/pcweb/PcChannel/Agency/AgencyclassList.aspx" method="post">
    <div class="bjui-searchBar">
        <ul class="breadcrumb">
            <li><a><i class="fa fa-university"></i>后台管理中心</a></li>
            <li><a><i class="fa fa-desktop"></i>电脑端管理</a></li>
            <li class="active"><a><i class="fa fa-list"></i>代理管理</a></li>
        </ul>
    </div>
    <div class="bjui-searchBar">
        <a class="btn btn-orange" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">刷新</a>
        <a class="btn btn-green" href="/bsm/pcweb/PcChannel/Agency/AgencyclassEdit.aspx" data-toggle="dialog" data-width="500" data-height="250" data-id="addAgencyclass" data-icon="plus">添加类别</a>
    </div>
    </form>
</div>
<div class="bjui-pageContent">
    <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="true" style="text-align: center;">
        <thead>
            <tr>
                <th style="text-align: center;">产品名称</th>
                <th style="text-align: center;">代理类别名称</th>
                <th style="text-align: center;">代理类别编号</th>
                <%--<th style="text-align: center;">代理类别等级</th>--%>
                <th style="text-align: center;">操作</th>
            </tr>
        </thead>
        <tbody>
            <%if (MessageTable != null && MessageTable.Rows.Count > 0)
                  {
                      foreach (System.Data.DataRow row in MessageTable.Rows)
                      {
                          %>
            <tr>
                <td style="text-align: center;">
                    <%= row["GoodsName"] %>
                </td>
                <td style="text-align: center;">
                    <%= row["AgencyClassName"] %>
                </td>
                <td style="text-align: center;">
                   <%= row["AgencyClassNo"] %>
                </td>
                <%--<td style="text-align: center;">
                    <a href="#"><%= row["Rank"] %></a>
                </td>--%>
                <td style="text-align: center;">
                    <a class="btn btn-green" href="/bsm/pcweb/PcChannel/Agency/AgencyClassEdit.aspx?id=<%= row["AgencyClassID"] %>" data-toggle="dialog"  data-width="500" data-height="250" data-id="addAgencyclass" data-title="修改">修改</a>
                    <a href="/bsm/ashx/PcChannel/AgencyClassAjax.ashx?dos=delete&id=<%= row["AgencyClassID"] %>" class="btn btn-red" data-toggle="doajax" data-confirm-msg="确定要删除该行信息吗？">删除</a>
                    <a class="btn btn-green" href="/bsm/pcweb/PcChannel/Agency/AgencyList.aspx?cid=<%= row["GoodsID"] %>" data-toggle="navtab" data-id="pc_channel_agencyList" data-title="代理列表">产品所属代理</a>
                    <a class="btn btn-green" href="/bsm/pcweb/PcChannel/Agency/AgencyEdit.aspx?cid=<%= row["AgencyClassID"] %>" data-toggle="dialog" data-width="500" data-height="300" data-id="addAgency">添加代理</a>

                </td>
            </tr>
            <%
                      }
                  }%>
        </tbody>
    </table>
</div>
<div class="bjui-pageFooter">
</div>
<script>
    function pc_channel_Goodsclasslist_js_delete(id) {
        $(this).alertmsg('confirm', '确定要删除该频道吗?', {
            okCall: function () {
                $.ajax({
                    type: "post",
                    url: "/bsm/ashx/PcChannel/GoodsclassDelete.ashx?id=" + id,
                    dataType: "json",
                    beforeSend: function (XMLHttpRequest) {

                    },
                    success: function (data) {
                        if (data.IsError) {
                            $(this).alertmsg('correct', data.Message);
                            $(this).navtab('refresh', 'pc_channel_GoodsclassList');
                        }
                        else {
                            $(this).alertmsg('error', data.Message);
                        }
                    },
                    error: function () {
                        $(this).alertmsg('error', '删除失败，请稍后再试！');
                    }
                });
            }
        });
    }

    function pc_channel_Goodsclasslist_js_show(id, show) {

        $.ajax({
            type: "post",
            url: "/bsm/ashx/PcChannel/GoodsclassShow.ashx?id=" + id + "&show=" + show,
            dataType: "json",
            beforeSend: function (XMLHttpRequest) {

            },
            success: function (data) {
                if (data.IsError) {
                    //$(this).alertmsg('correct', data.Message);
                    $(this).navtab('refresh', 'pc_channel_GoodsclassList');
                }
                else {
                    $(this).alertmsg('error', data.Message);
                }
            },
            error: function () {
                $(this).alertmsg('error', '操作失败，请稍后再试！');
            }
        });
    }

</script>
